package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.knowledge.domain.SysLogPerm;
import cn.cdeden.knowledge.domain.dto.SysLogPermDto;
import cn.cdeden.knowledge.domain.dto.SysLogPermQueryParam;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
* @author GW
* @date 2024-01-19
*/
public interface SysLogPermService extends IService<SysLogPerm> {

    static final String CACHE_KEY = "sysLogPerm";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<SysLogPermDto>
    */
    TableDataInfo<SysLogPermDto> queryAll(SysLogPermQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<SysLogPermDto>
    */
    List<SysLogPermDto> queryAll(SysLogPermQueryParam query);

    SysLogPerm getById(Long id);
    SysLogPermDto findById(Long id);

    /**
     * 插入一条新数据。
     */
    boolean insert(SysLogPermDto resources);

    boolean insertBatch(List<SysLogPerm> resources);

    boolean updateById(SysLogPermDto resources);
    boolean deleteById(Long id);
    boolean deleteByIds(Set<Long> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<SysLogPermDto> all, HttpServletResponse response) throws IOException;
}
